﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Jhong.FunMVC
{
    public class ContentResult : ActionResult
    {
        public override void Execute()
        {
            this._response.ContentType = @"text/html;charset=utf-8";
            this._response.Write(this._data == null ? string.Empty : this._data);
        }

        public ContentResult(string txt, Response response)
        {
            this._data = txt;
            this._response = response;
        }

        private string _data;
        private Response _response;
    }
}
